package com.pantuo.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pantuo.sys.pojo.Line;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface LineDao extends BaseMapper<Line> {

    void insertObject(List<Map<String, Object>> list);

    void updateObject(List<Map<String, Object>> list);

    //根据公司id查找出线路的名称以及对应的id
    public List<Map<String, Object>> findAllNames(Integer id);

    //根据公司id查线路名称
    public List<Map<String, Object>> findLineByCName(Integer id);

    public List<Map<String, Object>> findAllObjects(@Param("map1") Map<String, String> map1,
                                                    @Param("orderList") List<Map<String, String>> orderList,
                                                    Integer start,
                                                    Integer length
    );

    public Long getTotal(@Param("map1") Map<String, String> map1);

    public int findCountForLine(String startDate, String endDate);

    public int findThisMonthCount(String date_s);

}
